home *** CD-ROM | disk | FTP | other *** search
- G.SetGroup( "Cam" )
- local Cam = G.Create( "Data/BasicCamera.xml");
- local pos = Vector3(50,60,50);
- Cam.SetPosition( pos );
-
-
- function Glare()
- G.DoPostPass( "DownSample", 1, 1, 2 );
- G.DoPostPass( "Threshold", 2, 2, 3 );
- G.BlurBuffer( 3 , 5 );
- G.DoPostPass( "FinalGlare" , 1, 3, 0 );
- end
-
- function MonoChrome()
- G.DoPostPass( "MonoChrome", 1, 1, 0 );
- end
-
-
- MCog = G.Create( "Data/ModelCog.xml" );
- MCog.SetPosition( Vector3(90,10,90) );
-
- Obj = G.Create( "Data/KnotCog.xml" );
- Obj.SetPosition( Vector3(90, 0 , 90) );
-
- Obj = G.Create( "Data/PlaneCog.xml" );
- Obj.SetPosition( Vector3(90,0,90) );
-
- Obj = G.Create( "Data/LightCog.xml" );
- Obj.SetPosition( Vector3(90, 16 , 90) );
-
-
-
- numLights = 9;
- GLight = {};
- for y=1,numLights do
- GLight[y] = G.Create( "Data/LightCog.xml" );
- GLight[y].SetRange( 12 );
- GLight[y].SetAtt( 0 , 0 , 0.08 );
- GLight[y].SetColor( Color( 1, 1, 1, 1) );
- end
-
- --[[
- for y=1,numLights do
- GLight[y] = G.Create( "Data/LightCog.xml" );
- GLight[y].SetRange( 12 );
- GLight[y].SetAtt( 0 , 0 , 0.05 );
-
- local percent = (y-1) / ( numLights-1 );
-
- if( percent <= 1/3 ) then
- GLight[y].SetColor( Color( math.abs(1/3 - percent) * 3,
- math.abs(1/3 - (percent + 1/3) ) * 3,
- 0, 1) );
- end
-
- if( percent <= 2/3 and percent > 1/3 ) then
- GLight[y].SetColor( Color( 0,
- math.abs(1/3 - (percent - 1/3) ) * 3,
- math.abs(1/3 - (percent) ) * 3), 1 );
- end
-
- if( percent <= 1 and percent > 2/3 ) then
- GLight[y].SetColor( Color( math.abs(1/3 - (percent - 1/3) ) * 3,
- 0,
- math.abs(1/3 - (percent - 2/3) ) * 3), 1 );
- end
- end
- ]]--
-
- deferred = false;
-
-
- function LightMove()
-
- for y=1,numLights do
- local t = CoreTime + y * (2*3.14)/ numLights;
- local tpos = Vector3( 90 + math.cos( t ) * 20 , 5 , 90 + math.sin( t ) * 20 );
- GLight[y].SetPosition(tpos);
- end
-
- if( G.KeyTriggered( "C" ) ) then
- G.ScreenCap();
- end
-
- if( G.KeyTriggered( "X" ) ) then
- deferred = not deferred;
- G.DoDeferred( deferred );
- end
-
- end
-
- GArrows = {};
- for y=1,5 do
- for x=1,5 do
- GArrows[x+y*10] = G.Create( "Data/ArrowTest.xml" );
- local tpos = Vector3( x * 10 + 60, 0 , y * 10 + 60 );
- GArrows[x+y*10].SetPosition( tpos );
- GArrows[x+y*10].SetOrientation( FromDirection( Vector3(90,0,90) - tpos ) );
- end
- end
-
- GMain[ "LightMove" ] = LightMove;